<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="zh-CN" class="ua-windows ua-webkit">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>欢迎加入我们</title>
<link rel="stylesheet" type="text/css" href="<s:url value="/css/base.css"/>"></link>

<script src="<s:url value="/js/jquery-1.4.4.min.js"/>" type="text/javascript"></script>
<script src="<s:url value="/js/formValidator/formValidator-4.1.1.js"/>" type="text/javascript" charset="UTF-8"></script>
<script src="<s:url value="/js/formValidator/formValidatorRegex.js"/>" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
$(document).ready(function(){
	$.formValidator.initConfig({formID:"zcform",theme:"Default",debug:false,submitOnce:true,
		onError:function(msg,obj,errorlist){
			$("#errorlist").empty();
			$.map(errorlist,function(msg){
				$("#errorlist").append("<li>" + msg + "</li>")
			});
			alert(msg);
		},
		submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...',
		onShowClass : "",
		onFocusClass : "",
		onCorrectClass : ""
	});
	
	$("#username").formValidator({onShow:"输入您的大名吧，让其他人认识你。",onFocus:"姓名至少2个汉字,最多10个字符",onCorrect:"你还是很聪明的嘛~ ^_^"}).inputValidator({min:4,max:10,onError:"你输入的个姓名非法,请确认"});
	$("#email").formValidator({onShow:"请输入正确的邮箱，将会作为你登录的用户名。",onFocus:"邮箱6-100个字符,输入正确了才能离开焦点",onCorrect:"恭喜你,你输对了~~^_^",defaultValue:"@"})
	.inputValidator({min:6,max:100,onError:"你输入的邮箱长度非法,请确认"})
	.regexValidator({regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onError:"你输入的邮箱格式不正确"});
	
	$("#password").formValidator({onShow:"请输入密码",onFocus:"至少6个长度",onCorrect:"好吧，放你过去吧，要记住密码哦！~~^_^"}).inputValidator({min:6,empty:{leftEmpty:false,rightEmpty:false,emptyError:"密码两边不能有空符号"},onError:"密码错误,请确认"});
	
	
});
	
</script>
<style type="text/css">

</style>
</head>
<body>
	<%@include file="/top.jsp"%>
	<div id="wrapper">
		<div id="header">
			<div class="site-nav single-nav">
				<div class="site-nav-logo">
				</div>
			</div>
		</div>
		<div id="content">

			<h1>欢迎加入我们</h1> <span class="errorMessage">${message}</span>
			<div class="grid-16-8 clearfix">
				<div class="article">
					<form id="zcform" name="zcform" method="post" action="<s:url value="/account/user/reg.action?op=save" />">
						<div class="item extra-tips">
							<label>姓名</label>
							<input type="text" id="username" maxlength="200" class="basic-input" name="userinfo.username" />
						</div>
						<div class="suggestion" >
							<span id="usernameTip"></span>
						</div>
						<div class="item extra-tips">
							<label>邮箱</label>
							<input type="text" id="email" maxlength="200" class="basic-input"  name="userinfo.email" />
						</div>
						<div class="suggestion" >
							<span id="emailTip"></span>
						</div>						
						<div class="item extra-tips">
							<label>密码</label>
							<input type="password" id="password" maxlength="100" class="basic-input" name="userinfo.userpwd" />
						</div>
						<div class="suggestion" >
							<span id="passwordTip"></span>
						</div>
						
						<div class="item-submit">
							<label>&nbsp;</label> 
							<br/>
							<input type="submit" class="btn-submit" value="加入大家!" />
						</div>
					</form>
				</div>
				<div class="aside">

					<p class="pl">
						&gt;&nbsp;已经拥有帐号? <a rel="nofollow"
							href="<s:url value="/account/user/login.action" />">直接登录</a>
					</p>
				</div>
				<div class="extra">
				</div>
			</div>
		</div>


		<%@include file="/footer.jsp"%>

	</div>

</body>
</html>

